<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>数组操作</title>
		<script>
			var a=new Array(5);
			a[0]="dog";
			a[1]="pig";
			a[2]="cow";
			a[3]="sheep";
			a[4]="goat";
			a.push("小狗");
			a.unshift("小鸡");
			alert(a.length);
			alert(a.join("@"));
			console.log(a);
			a.splice(3,1,"大黄","二黄","崔花");
			console.log(a);
			var key=prompt("请输入你要找的动物","小狗");
			var b=a.includes(key);
			alert(b);
		</script>
	</head>
	<body>
	</body>
</html>